// 一、轮播图类型
interface BannerItemType {
  id: string;
  //   gmtCreate: "2019-11-13 18:05:32";
  //   gmtModified: "2021-08-09 21:28:41";
  //   deleted: false;
  title: string;
  imageUrl: string;
  linkUrl: string;
  //   sort: 1;
}
export type BannerListType = BannerItemType[];
export interface BannerListResponseType {
  bannerList: BannerListType;
}
// 二、首页数据类型
export interface TeacherItemType {
  id: string;
  //   gmtCreate: "2019-11-19 17:41:37";
  //   gmtModified: "2022-05-09 20:04:27";
  //   deleted: false;
  name: string;
  career: string;
  //   level: 1;
  avatar: string;
  //   sort: 1;
}
export interface CourseItemType {
  id: string;
  //   teacherId: "1189389726308478977";
  //   subjectId: "1178214681139539969";
  //   subjectParentId: "1178214681118568449";
  title: string;
  price: string;
  //   lessonNum: 20;
  cover: string;
  buyCount: number;
  viewCount: number;
  //   version: 6;
  //   status: "Normal";
  //   gmtCreate: "2018-04-02 21:28:46";
  //   gmtModified: "2022-09-20 09:19:40";
}
export type TeacherListType = TeacherItemType[];
export type CourseListType = CourseItemType[];

export interface HomeDataType {
  teacherList: TeacherListType;
  courseList: CourseListType;
}

// 三、课程列表
export interface CourseDataItemType {
  id: string;
  // teacherId: string;
  // subjectId: string;
  // subjectParentId: string;
  title: string;
  price: number;
  lessonNum: number;
  cover: string;
  buyCount: number;
  viewCount: number;
  // version: 1;
  // status: "Normal";
  // gmtCreate: "2019-11-07 09:27:33";
  // gmtModified: "2022-09-20 10:26:36";
}
export type CourseDataListType = CourseDataItemType[];

export interface resCourseDataType {
  current: number;
  total: number;
  pages: number;
  size: number;
  hasPrevious: boolean;
  hasNext: boolean;
  items: CourseDataListType;
}

export interface TokenType {
  token: string;
}

// 四、定义课程详情类型
/* 
{
    "isBuy": true,
    "chapterList": [
      {
        "id": "15",
        "title": "第一章：Java入门",
        "children": [
          {
            "id": "17",
            "title": "第一节：Java简介",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          },
          {
            "id": "18",
            "title": "第二节：表达式和赋值语句",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          },
          {
            "id": "19",
            "title": "第三节：String类",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          },
          {
            "id": "20",
            "title": "第四节：程序风格",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          }
        ]
      },
      {
        "id": "32",
        "title": "第二章：控制台输入和输出",
        "children": [
          {
            "id": "1182499307429339137",
            "title": "第一节",
            "free": false,
            "videoSourceId": "fd7adcc363824793a4b90e1969d1a228"
          }
        ]
      },
    ],
    "isCollect": true,
    "course": {
      "id": "18",
      "title": "Java精品课程",
      "price": 22800.00,
      "lessonNum": 20,
      "cover": "https://online-teach-file.oss-cn-beijing.aliyuncs.com/cover/2021/08/09/e4ee03d7-52bd-41ca-99f9-04dc23250a71.jpg",
      "buyCount": 6786,
      "viewCount": 68489,
      "description": "<p>本套Java视频完全针对零基础学员，课堂实录，自发布以来，好评如潮！Java视频中注重与学生互动，讲授幽默诙谐、细致入微，覆盖Java基础所有核心知识点，同类Java视频中也是代码量大、案例多、实战性强的。同时，本Java视频教程注重技术原理剖析，深入JDK源码，辅以代码实战贯穿始终，用实践驱动理论，并辅以必要的代码练习。</p>\n<p>------------------------------------</p>\n<p>视频特点：</p>\n<p>通过学习本Java视频教程，大家能够真正将Java基础知识学以致用、活学活用，构架Java编程思想，牢牢掌握\"源码级\"的Javase核心技术，并为后续JavaWeb等技术的学习奠定扎实基础。<br /><br />1.通俗易懂，细致入微：每个知识点高屋建瓴，深入浅出，简洁明了的说明问题<br />2.具实战性：全程真正代码实战，涵盖上百个企业应用案例及练习<br />3.深入：源码分析，更有 Java 反射、动态代理的实际应用等<br />4.登录尚硅谷官网，技术讲师免费在线答疑</p>",
      "teacherId": "1189389726308478977",
      "teacherName": "封老师",
      "intro": "中国人民大学软件工程硕士。精通java核心框架、大数据Hadoop、Spark技术，曾先后就职于南天软件、用友金融、中植集团、百合贷，任技术经理、项目经理、技术部负责人。主持开发了中信银行、国家电网、中植集团、东方资产等大型企业的金融类系统，也对时下流行的互联网金融有深入的研究。 十余年的项目经历，练就了纯厚的技术底蕴和丰富的职场经验。",
      "avatar": "http://47.93.148.192:8080/group1/M00/01/72/rBHu8mEQyliAYtsQAAA0GUaiJrk198.jpg",
      "subjectLevelOneId": "1178214681118568449",
      "subjectLevelOne": "后端开发",
      "subjectLevelTwoId": "1178214681139539969",
      "subjectLevelTwo": "Java"
    }
  }
*/
export interface ChapterChildrenItemType {
  id: string;
  title: string;
  free: boolean;
  videoSourceId: string;
}
export type ChapterChildrenType = ChapterChildrenItemType[];

export interface ChapterItemType {
  id: string;
  title: string;
  children: ChapterChildrenType;
}

export type ChapterListType = ChapterItemType[];

export interface CourseType {
  id: string;
  title: string;
  price: number;
  lessonNum: number;
  cover: string;
  buyCount: number;
  viewCount: number;
  description: string;
  teacherId: string;
  teacherName: string;
  intro: string;
  avatar: string;
  subjectLevelOneId: string;
  subjectLevelOne: string;
  subjectLevelTwoId: string;
  subjectLevelTwo: string;
}
export interface CourseDetailResponseType {
  isBuy: boolean;
  chapterList: ChapterListType;
  isCollect: boolean;
  course: CourseType;
}

// 五、定义课程评论类型
export interface CommentsItemType {
  id: string;
  gmtCreate: string;
  gmtModified: string;
  deleted: null;
  courseId: string;
  teacherId: string;
  memberId: string;
  nickname: string;
  avatar: string;
  content: string;
}
export type CommentsItemsType = CommentsItemType[];
export interface CourseCommentsType {
  current: 1;
  total: number;
  pages: 4;
  size: 10;
  hasPrevious: boolean;
  hasNext: boolean;
  items: CommentsItemsType;
}

// 六、阿里云视频播放授权类型
export interface VideoPlaybackAuthorizationType {
  playURL: string;
}

// 七、定义名师列表类型
export interface ReqTeacherItemType {
  id: string;
  gmtCreate: string;
  gmtModified: string;
  deleted: boolean;
  name: string;
  intro: string;
  career: string;
  level: number;
  avatar: string;
  sort: number;
}
export type ReqTeacherItemsType = ReqTeacherItemType[];
export interface ReqTeacherListType {
  current: 1;
  total: number;
  pages: number;
  size: 10;
  hasPrevious: boolean;
  hasNext: boolean;
  items: ReqTeacherItemsType;
}
// 定义教师详情类型
// export interface TeacherType {
//   id: string;
//   // gmtCreate: string;
//   // gmtModified: string;
//   // deleted: boolean;
//   name: string;
//   intro: string;
//   // career: string;
//   // level: number;
//   avatar: string;
//   // sort: number;
// };
// export interface ReqCourseItemType {
//   id: string;
//   teacherId: string;
//   subjectId: string;
//   subjectParentId: string;
//   title: string;
//   price: number;
//   lessonNum: number;
//   cover: string;
//   buyCount: number;
//   viewCount: number;
//   version: number;
//   status: string;
//   gmtCreate: string;
//   gmtModified: string;
// }
// export type ReqCourseListType = []
// export interface TeacherDetailType {
//   teacher: TeacherType,
//   courseList: ReqCourseListType;
// }
